from django.shortcuts import redirect
from core.views import index


def logout(request):
    request.session.pop('user_id', None)
    return redirect(index)
